An exception to the non-declaration of global variables occurs where a program has several source files. Where a global variable is declared in one file, but used by functions from another, then the variable is called an external variable in these functions, and must be declared as such. That declaration must be proceeded by the word extern. The external variable is really a special type of global variable. The declaration is required so the compiler can find the type of the variable without having to search through several source files for the declaration.
Global and external variables can take any type available to local variables. They can be initialised in the same way, but the initialisation takes place when the program starts up, before execution of the main function.